
* "On Paying Workers to Stop Working: Public Attitudes Towards ‘Wage Buyouts’"
* Krzysztof Pelc
* Perspectives on Politics
* Replication * 

* set dir

* cd "WageBuyouts_Replication_files"

* Study 1

use "study1.dta", clear

*** Table 1 

eststo clear
* subsample of full time employed people:

xi: reg full_wage  employer_check govt_check ideology educ_num income_num male white age if exp_cond2!="NA", cluster(state)
estimates store r1

xi: reg full_wage  employer_check govt_check dem rep educ_num income_num male white age, cluster(state)
estimates store r2

xi: reg full_wage  employer_check govt_check ideology educ_num income_num male white age rural manufacturing covid_impact, cluster(state)
estimates store r4

xi: reg full_wage  employer_check govt_check ideology educ_num income_num male white age rural manufacturing  covid_impact i.region , cluster(state)
estimates store r5

esttab r1 r2      r4 r5 using "table1.tex", label  order(employer_check govt_check ideology democrat republican educ_num income_num male white age rural manufacturing covid_impact) nonotes se(3) b(3) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps nodepvars 

* Coefficient plot 

coefplot r4  ,  drop(_cons) keep(full_wage  employer_check govt_check ideology democrat republican educ_num income_num male rural manufacturing  covid_impact) xline(0) 
graph save Graph "coeff_treatment1.gph", replace
graph export "coeff_treatment1.pdf", replace

* summary stats

xi: reg full_wage  employer_check govt_check  ideology educ_num income_num male white age rural manufacturing  covid_impact i.region , cluster(state)

eststo clear
estpost summarize   employer_check govt_check control_group full_wage ideology educ_num income_num male white age rural manufacturing covid_impact if e(sample)  

esttab   using "sum1.tex", replace ////
 cells(" mean(fmt(%6.2fc)) sd(fmt(%6.2fc))  min(fmt(%6.0fc)) max(fmt(%6.0fc)) count(fmt(%6.0fc))") nonumber ///
  nomtitle nonote noobs label booktabs ///
  collabels( "Mean" "SD" "Min" "Max" "N")

   
*** Table 2 

eststo clear

xi: reg full_wage  employer_check govt_check rti_goos ideology educ_num income_num male white age rural manufacturing trade_union_yes, cluster(state)
estimates store r1

xi: reg full_wage  employer_check govt_check offshoring_goos ideology educ_num income_num male white age rural manufacturing trade_union_yes, cluster(state)
estimates store r2

* xi: reg full_wage  employer_check govt_check rti_gingrich ideology educ_num income_num male white age rural manufacturing trade_union_yes, cluster(state)

xi: reg full_wage  employer_check govt_check likely_job_loss_aut ideology educ_num income_num male white age rural manufacturing trade_union_yes, cluster(state)
estimates store r3

xi: reg full_wage  employer_check govt_check likely_job_loss_off ideology educ_num income_num male white age rural manufacturing trade_union_yes, cluster(state)
estimates store r4

xi: reg full_wage  employer_check govt_check ladder_personal_inv ideology educ_num income_num male white age rural manufacturing trade_union_yes , cluster(state)
estimates store r5

esttab r1 r2 r3 r4 r5 using "table2.tex", label  order(employer_check govt_check rti_goos offshoring_goos likely_job_loss_aut likely_job_loss_off  ladder_personal_inv ideology educ_num income_num male white age rural manufacturing trade_union_yes ) nonotes se(3) b(3) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps nodepvars 


*** Table 3  

eststo clear
reg id_job ideology educ_num income_num male white age rural manufacturing if employed==1, cluster(state)
estimates store r1

reg id_job dem educ_num income_num male white age rural manufacturing if employed==1, cluster(state)
estimates store r2

reg id_job rep educ_num income_num male white age rural manufacturing if employed==1, cluster(state)
estimates store r3

esttab r1 r2 r3 using "table3.tex", label  order(ideology democrat republican educ_num income_num male white age rural manufacturing) nonotes se(3) b(3) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps nodepvars 
 
 
* Study 2

use "study2.dta", clear
 
* gen fulltreatment=1 if living_wage_1=="stop working"
* replace fulltreatment=0 if living_wage_1=="work half the number of hours you work currently"

* graph Attitudes Towards Wage Buyouts, Full vs. Partial
graph box living_wage_dv_1, over(living_wage_1 ) 
graph save Graph "Prolific_DV_box.gph"


eststo clear
estpost summarize living_wage_dv_1 conseq  deont  pid income_num educ_num male white age  fulltimeemployed

esttab   using "sum2.tex", replace ////
 cells(" mean(fmt(%6.2fc)) sd(fmt(%6.2fc))  min(fmt(%6.0fc)) max(fmt(%6.0fc)) count(fmt(%6.0fc))") nonumber ///
  nomtitle nonote noobs label booktabs ///
  collabels( "Mean" "SD" "Min" "Max" "N")
  

* Study 3

use "study3.dta", clear
 
* Table 4

eststo clear

eststo: xi: reg lottery_1 order_lottery_first resp_republican  currently_working resp_collegeeducated income  resp_white resp_male protestant  log_age  [pweight= invwt], robust cluster(state_code )

eststo: xi: reg ubi_1 order_lottery_first resp_republican  currently_working resp_collegeeducated income  resp_white resp_male protestant  log_age  [pweight= invwt], robust cluster(state_code )

eststo: xi: reg diff_lottery_ubi  order_lottery_first resp_republican  currently_working resp_collegeeducated income  resp_white resp_male protestant  log_age  [pweight= invwt], robust cluster(state_code )

esttab using "table4.tex", label keep( order_lottery_first resp_republican   resp_white resp_male protestant  resp_collegeeducated log_age income currently_working) order(  order_lottery_first resp_republican    currently_working resp_white resp_male protestant  resp_collegeeducated  income log_age) nonotes se(2) b(2) replace star(* 0.10 ** 0.05 *** 0.01) compress nogaps nodepvars 

eststo clear
estpost summarize  lottery_1 ubi_1 diff_lottery_ubi  order_lottery_first resp_republican  currently_working resp_collegeeducated income  resp_white resp_male protestant  log_age if e(sample)  

esttab   using "sum3.tex", replace ////
 cells(" mean(fmt(%6.2fc)) sd(fmt(%6.2fc))  min(fmt(%6.0fc)) max(fmt(%6.0fc)) count(fmt(%6.0fc))") nonumber ///
  nomtitle nonote noobs label booktabs ///
  collabels( "Mean" "SD" "Min" "Max" "N")
 
 
* WVS descriptives

use "WVS_Cross-National_Wave_7_inverted_stata_v6_0.dta", clear
 
graph dot (mean) work leisure if oecd == 1, over(B_COUNTRY_ALPHA, sort(1) descending) ///
    ylabel(1(1)4, grid) ///
    yscale(r(1 4))
	
graph dot (mean) duty if oecd == 1, over(B_COUNTRY_ALPHA, sort(1) descending) ///
    title("") ///
    ytitle("Average Country Value") ///
    ylabel(1(1)5, grid) ///
    yscale(r(1 5))
 
 
 
 ** end **
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
